{extend name="frame/base" /}
{block name="body"}
<table>
    <thead>
    <tr>
        <th>文章名称</th>
        <th>别名</th>
        <th>排序</th>
        <th>作者</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="data"}
    <tr>
        <td>{$data['title']}</td>
        <td>{$data['alias']}</td>
        <td>{$data['sort']}</td>
        <td>{$data['author']}</td>
        <td><a href="/admin/article/edit?id={$data['id']}&cate_id={$cate_id}">编辑文章</a><a href="javascript:openwindow({$data['id']})">前台浏览</a>
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{$list->render()}
<script>
    function openwindow(id) {
        parent.window.open("/article/"+id+".html")
    }
    function del(id) {
        if (confirm("请确认要删除此记录"))
            window.location.href = "/admin/cate/delete?id=" + id
    }
</script>
<br>
<a href="/admin/article/edit?cate_id={$cate_id}" class="button">添加文章</a>
{/block}
